package com.haoshuang.zhouzhoubang.ui.dialog

import android.content.Context
import com.haoshuang.zhouzhoubang.R
import com.haoshuang.zhouzhoubang.databinding.DialogUploadProgressBinding
import com.lxj.xpopup.core.CenterPopupView

class UploadProgressDialog(context: Context) : CenterPopupView(context) {

    private lateinit var binding: DialogUploadProgressBinding

    override fun getImplLayoutId(): Int {
        return R.layout.dialog_upload_progress
    }

    override fun onCreate() {
        super.onCreate()
        binding = DialogUploadProgressBinding.bind(popupImplView)

    }

    /**
     * 设置上传进度
     */
    fun updateProgress(progress: Int, ){
        binding.circleProgress.setProgress(progress)
    }

    fun updateAllProgress(index: Int, max: Int){
        binding.tvProgress.text = "$index/$max"
    }
}